package com.ruoyi.qualityManagement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qualityManagement.mapper.IncomingInspectionMapper;
import com.ruoyi.qualityManagement.domain.IncomingInspection;
import com.ruoyi.qualityManagement.service.IIncomingInspectionService;

/**
 * 来料检管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-05
 */
@Service
public class IncomingInspectionServiceImpl implements IIncomingInspectionService 
{
    @Autowired
    private IncomingInspectionMapper incomingInspectionMapper;

    /**
     * 查询来料检管理
     * 
     * @param inspectionId 来料检管理主键
     * @return 来料检管理
     */
    @Override
    public IncomingInspection selectIncomingInspectionByInspectionId(Long inspectionId)
    {
        return incomingInspectionMapper.selectIncomingInspectionByInspectionId(inspectionId);
    }

    /**
     * 查询来料检管理列表
     * 
     * @param incomingInspection 来料检管理
     * @return 来料检管理
     */
    @Override
    public List<IncomingInspection> selectIncomingInspectionList(IncomingInspection incomingInspection)
    {
        return incomingInspectionMapper.selectIncomingInspectionList(incomingInspection);
    }

    /**
     * 新增来料检管理
     * 
     * @param incomingInspection 来料检管理
     * @return 结果
     */
    @Override
    public int insertIncomingInspection(IncomingInspection incomingInspection)
    {
        incomingInspection.setCreateTime(DateUtils.getNowDate());
        return incomingInspectionMapper.insertIncomingInspection(incomingInspection);
    }

    /**
     * 修改来料检管理
     * 
     * @param incomingInspection 来料检管理
     * @return 结果
     */
    @Override
    public int updateIncomingInspection(IncomingInspection incomingInspection)
    {
        return incomingInspectionMapper.updateIncomingInspection(incomingInspection);
    }

    /**
     * 批量删除来料检管理
     * 
     * @param inspectionIds 需要删除的来料检管理主键
     * @return 结果
     */
    @Override
    public int deleteIncomingInspectionByInspectionIds(Long[] inspectionIds)
    {
        return incomingInspectionMapper.deleteIncomingInspectionByInspectionIds(inspectionIds);
    }

    /**
     * 删除来料检管理信息
     * 
     * @param inspectionId 来料检管理主键
     * @return 结果
     */
    @Override
    public int deleteIncomingInspectionByInspectionId(Long inspectionId)
    {
        return incomingInspectionMapper.deleteIncomingInspectionByInspectionId(inspectionId);
    }
}
